<template>
  <div class="hello">
    	<!--数据的显示  表达式和 v-text指令-->
		{{message}}
		<span v-text="info"></span>
		<!--双向数据绑定 v-model-->
		<input type="text" v-model="message "/>
		<hr />
		<ul>
			<li v-for='(v,index) in lists'>{{index}}----{{v.id}}------{{v.title}}</li>
		</ul>
		<!--出发时事件-->
		<button v-on:click="go()">点击</button>
		<button @click='run()'>重击</button>
	
  </div>
</template>

<script>
export default {
		data(){
    		return {
    		message:'hell world',
    		info:'我是Vue',
    		lists:[
    			{id:1,title:'去吃饭'},
    			{id:2,title:'去唱歌'},
    			{id:3,title:'打篮球'},
    			{id:4,title:'打羽毛球'},
    			{id:5,title:'打乒乓球'},
    			{id:6,title:'敲代码'}, 
    			]
    		}
    	},
		
    		methods:{
    			go(){
    				console.log('go go go ')
    			},
    			run(){
    				console.log('run')
    			}
    		}
    			
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
